package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)" json:"username"`
	Password string `gorm:"type:varchar(255)" json:"password"`
}
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int" json:"uid"`
	Rid int `gorm:"type:int" json:"rid"`
}
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(40)" json:"roleName"`
}
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int" json:"rid"`
	Nid int `gorm:"type:int" json:"nid"`
}
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)" json:"nodeName"`
}
type Git struct {
	gorm.Model
	GitNum  string `gorm:"type:varchar(30)" json:"git_num"`  //编号
	GitName string `gorm:"type:varchar(50)" json:"git_name"` //名称
}

type Order struct {
	gorm.Model
	OrderNum  string `gorm:"type:varchar(30)" json:"order_num"`  //订单编号
	OrderCode string `gorm:"type:varchar(30)" json:"order_code"` //订单号
	Gid       int    `gorm:"type:int" json:"gid"`
}

type GitOrder struct {
	OrderID   int    `gorm:"type:int" json:"order_id"`
	GitNum    string `gorm:"type:varchar(30)" json:"git_num"`    //编号
	GitName   string `gorm:"type:varchar(50)" json:"git_name"`   //名称
	OrderNum  string `gorm:"type:varchar(30)" json:"order_num"`  //订单编号
	OrderCode string `gorm:"type:varchar(30)" json:"order_code"` //订单号
	Gid       int    `gorm:"type:int" json:"gid"`
}
